﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace WebAPILib.APIs.DaZhouDianPing
{
    public class DianPingAPIs 
    {

        ShopInfo_Params_ToQueryStr StrConvert = new ShopInfo_Params_ToQueryStr();


        /// <summary>
        /// 搜索商户
        /// </summary>
        /// <param name="queryParams"></param>
        /// <returns></returns>
        public ShopInfo_Result GetShopInfosByWebAPI(ShopInfo_QueryParams  queryParams)
        {
            //1 将参数对象转换成查询字符串后缀 组合完整的查询Url

            string QueryUrl =StrConvert.Translate(queryParams);

            //2 提交查询，获取返回字符串
            int status = 0;
            string ResultStr = BaseInfo.RequestUrl(QueryUrl,out status); //BaseInfo.CallWebPage(QueryUrl, null, null);

            //3 转换成结果对象，返回

            ShopInfo_Result result = (ShopInfo_Result)JsonToObject.GetObject(ResultStr);

            return result;
        }

    }
}
